var imgList = new Object();
var imgkey = 0;
var addHtmlText = '';
$.extend({
    listEdit:{
        readyData:function(){
            if(imgList){
            $.each(imgList,function(i,n){
                if(n){
                    var strIn = '';
                    $.each(n,function(k,v){
                        if(v != undefined){
                            if(strIn != '')strIn += ',';
                            strIn += v;
                        }
                    });
                    $('#'+i).val(strIn);
                }
            });
            }
            if(addHtmlText && addHtmlText != undefined){
            $.each(addHtmlText,function(i,n){
                eval('var content = editor_'+n+'.html();');
                if($('#'+n+i).length > 0){
                    $('#'+n+i).html(content);
                }else{
                   
                $('#addHtmlText').append('<textarea id="'+n+i+'" style="diaplsy:none;" name="'+n+'" >'+content+'</textarea>');
                }
            });
            }

            $('#editForm').submit();
        },
        deleteImg:function(url,name,Pname,th){
            eval("imgList."+Pname+"in."+name+" = undefined;");
            $(th).parent().remove();
            $.post(WEB_IN+'?r=channel/DeleteCover',{path:url});
        }
    }
});